home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 01 New Uploads / P4MEM.TXT < prev    next >
Encoding:
Text File  |  2019-04-13  |  24.4 KB  |  738 lines

  1.  
  2. ;    Commodore plus/4 and
  3. ;    Commodore 16 Memory Map
  4. ;
  5. ;    V1.1    9 Dec 1994
  6. ;
  7.  
  8. Label Hex Addr.   Decimal Loc.    Description
  9.  
  10. PDIR    $0000        0    7501 on-chip data-direction register
  11. PORT    $0001        1    7501 on-chip 8-bit Input/Output register
  12. SRCHTK    $0002        2    Token 'search' looks for (run-time stack)
  13. ZPVEC1    $0003-0004    3-4    Temp (renumber)
  14. ZPVEC2    $0005-0006    5-6    Temp (renumber)
  15. CHARAC    $0007        7    Search character
  16. ENDCHR    $0008        8    Flag: scan for quote at end of string
  17. TRMPOS    $0009        9    Screen column from last TAB
  18. VERCK    $000A        10    Flag: 0 = load 1 - verify
  19. COUNT    $000B        11    Input buffer pointer / No. of subsctipts
  20. DIMFLG    $000C        12    Flag: Default Array DIMension
  21. VALTYP    $000D        13    Data type: $FF = string    $00 = numeric
  22. INTFLG    $000E        14    Data type: $80 = integer, $00 = floating
  23. DORES    $000F        15    Flag: DATA scan/LIST quote/garbage coll
  24. SUBFLG    $0010        16    Flag: subscript ref / user function coll
  25. INPFLG    $0011        17    Flag: $00 = INPUT, $43 = GET, $98 = READ
  26. TANSGN    $0012        18    Flag TAN siqn / comparison result
  27. CHANNL    $0013        19    Flag: INPUT prompt
  28. LINNUM    $0014-0015    20-21    Temp: integer value
  29. TEMPPT    $0016        22    Pointer: temporary string stack
  30. LASTPT    $0317-0018    23-24    Last temp string address
  31. TEMPST    $0019-0021    25-33    Stack for temporary strings
  32. INDEX1    $0022-0023    34-35    Utility pointer area
  33. INDEX2    $0024-0025    36-37    Utility pointer area
  34. RESHO    $0026        38
  35. RESMOH    $0027        39
  36. RESMO    $0028        40
  37. RESLO    $0029        41
  38.     $002A        42
  39. TXTTAB    $002B-002C    43-44    Pointer: start of BASIC text
  40. VARTAB    $002D-002E    45-46    Pointer: start of BASIC variables
  41. ARYTAB    $002E-0030    47-48    Pointer: start of BASIC arrays
  42. STREND    $0031-0032    49-50    Pointer: end of BASIC arrays (+1)
  43. FRFTOP    $0033-0034    51-52    Pointer: bottom of string storage
  44. FRESPC    $0035-0036    53-54    Utility string pointer
  45. MEMSIZ    $0037-0038    55-56    Pointer: highest address used by BASIC
  46. CURLIN    $0039-003A    57-58    Current BASIC line number
  47. TXTPTR    $003B-003C    59-60
  48. FNDPNT    $003D-003F    61-62
  49. DATLIN    $003F-0040    63-64    Current DATA line number
  50. DATPTR    $0041-0042    65-66    Pointer: Current DATA item address
  51. INPPTR    $0043-0044    67-68    Vector: INPUT routine
  52. VARNAM    $0045-0046    69-70    Current BASIC variable name
  53. VARPNT    $0047-0048    71-72    Pointer: Current BASIC variable data
  54. FORPNT    $0049-004A    73-74    Pointer: Index variable for FOR/NEXT
  55. OPPTR     $0048-004C    75-76
  56. OPMASK    $004D        77
  57. DEFPNT    $004E-004F    78-79
  58. DSCPNT    $0050-0051    80-81
  59.     $0052        82
  60. HELPER    $0053        83
  61. JMPER    $0054        84
  62. SIZE    $0055        85
  63. OLDOV    $0056        86
  64. TEMPF1    $0057        87
  65. HIGHDS     $0058-0059    88-89
  66. HIGHTR     $005A-005B    90-91
  67.     $005C        92
  68. LOWDS    $005D-005E    93-94
  69. LoWTR    $005F        95
  70. EXPSGN    $0060        96
  71. FACEXP    $0061        97    Floating-point accumulator #1: exponent
  72. FACHO    $0062        98    Floating accum. #1: mantissa
  73. FACMOH    $0063        99
  74. FACMO    $0064        100
  75. FACLo    $0065        101
  76. FACSGN     $0066        102    Floating accum. #1: sign
  77. SGNFLG     $0067        103    Pointer: series evaluation constant
  78. BITS    $0068        104    Floating accum. #1: overflow digit
  79. ARGEXP     $0069        105    Floating-point accumulator #2: exponent
  80. ARGHO    $006A        106    Floating accum. #2: mantissa
  81. ARGMOH    $006B        107
  82. ARGMO    $006C        108
  83. ARGLO    $006D        109
  84. ARGSGN     $006E        110    Floating accum. #2: sign
  85. ARISGN     $006F        111    Sign comparison result: accum. #1 vs #2
  86. FACOV    $0070        112    Floating accum. #1. low-order (rounding)
  87. FBUFPT     $0071-0072    113    Pointer: cassette buffer
  88. AUTINC     $0073-0074    115-116    Increment value for auto (0 = off)
  89. MVDFLG     $0075        117    Flag if 10K hires allocated
  90. KEYNUM     $0076        118
  91. KEYSIZ     $0077        119
  92. SYNTMP     $0078        120    Used as temp Eor indirect loads
  93. DSDESC     $0079-0078    121-123    Descriptor for DSS
  94. TOS    $007C-037D    124-125    Top of run time stack
  95. TMPTON     $007E-007F    126-127    Temps used by music (tone & volume)
  96. VOICNO     $0080        128
  97. RUNMOD     $0081        129
  98. POINT    $0082        130
  99. GRAPHM     $0083        131    Current graphic mode
  100. COLSEL    $0084        132    Current color selected
  101. MC1    $0085        133    Multicolor 1
  102. FG    $0086        134    Foreground color
  103. SCXMAX    $0087        135    Maximum # of columns
  104. SCYMAX     $0088        136    Maximum # of rows
  105. LTFLAG     $0089        137    Paint-left flag
  106. RTFLAG    $008A        138    Paint-Right flag
  107. STOPNH    $008B        139    Stop paint if not BG (Not same Color)
  108. GRAPNT    $008C-008D    140-141
  109. VTEMP1    $008E        142
  110. VTEMP2     $008F        143
  111.  
  112. STATUS     $0090        144    Kernal I/O status word: ST
  113. STREY    $0091        145    Flag: STOP key / RVS key
  114. SPVERR    $0092        146    Temp
  115. VERFCK     $0093        147    Flag:  0 = load,  1 = verify
  116. C3PO    $0094        148    Plag: serial bus - output char buffered
  117. BSOUR    $0095        149    Buffered character for serial bus
  118. XSAV    $0096        150    Temp for basin
  119. LDTND    $0097        151    # of open files / index to file table
  120. DFLTN    $0098        152    Default input device (0)
  121. DFLTO    $0099        153    Default output (CMD) device (3)
  122. MSGFLG     $009A        154    Flag:    $80 = direct mode  $00 = program
  123. SAL    $009B        155    Tape pass 1 error log
  124. SAH    $009C        156    Tape pass 2 error log
  125. EAL    $009D        157
  126. EAH    $009E        158
  127. T1    $009F-00A0    159-160    Temp data area
  128. T2    $00A1-00A2    161-162    Temp data area
  129. TIME    $00A3-00A5    163-165    Real-time jiffy clock (approx) 1/60 sec
  130. R2D2    $00A6        166    Serial bus usage (EOI on output)
  131. TPBYTE    $00A7        167    Byte to be written/read on/off tape
  132. BSOUR1    $00A8        168    Temp used by serial routine
  133.  
  134. FPVERR    $00A9        169
  135. DCOUNT    $00AA        170
  136. FNLEN    $00A8        171    Length of current file name
  137. LA    $00AC        172    Current logical fiie number
  138. SA    $00AD        173    Current seconda.y address
  139. FA    $00AE        174    Current device number
  140. FNADR    $00AF-00B0    175-176    Pointer: current file name
  141. ERRSUM    $00B1        177
  142. STAL     $00B2        178     I/O start address
  143. STAH     $00B3        179
  144. MEMUSS    $00B4-00B5    180-181    Load ram base
  145. TAPEBS    $00B6-00B7    182-183    Base pointer to cassette base
  146. TMP2     $00B8-00B9    184-185
  147. WRBASE    $00BA-00BB    186-187    Pointer to data for tape writes
  148. IMPARM    $00BC-00BD    188-189    Pointer to immediate string for primms
  149. FETPTR    $00BE-00BF    190-191    Pointer to byte to be fetched in bank fetc
  150. SEDSAL    $00C0-00C1    192-193    Temp for scrolling
  151. RVS    $00C2        194    RVS field flag on
  152. INDX     $00C3        195
  153. LSXP     $00C4        196    X position at start
  154. LSTP     $00C5        197
  155. SFDX     $00C6        198    Flag: shift mode for print
  156. CRSW     $00C7        199    Flag: INPUT or GET from keyboard
  157. PNT    $00C8-00C9    200-201    Pointer: current screen line address
  158. PNTR     $00CA        202    Cursor column on current line
  159. QTSW     $00CB        203    Flag: editor in quote mode, $00 = no
  160. SEDT1    $00CC        204    Editor temp use
  161. TBLX    $00CD        205    Current cursor physical line number
  162. DATAX    $00CE        206    Temp data area
  163. INSRT    $00CF        207    Flag: insert mode, >0 = # INSTs
  164.     $00D0-$00D7    208-215    Area for use by speech software
  165.     $00D8-00E8    216-232    Area for use by application software
  166. CIRSEG    $00E9        233    Screen line link table / editor temps
  167. USER    $00EA-00EB    234-235    Screen editor color IP
  168. KEYTAB    $00EC-00ED    236-237    Key scan table indirect
  169. TMPKEY    $00EE        238
  170. NDX    $00EF        239    Index to keyboard queue
  171. STPFLG    $00F0        240    Pause flag
  172. TO    $00F1-00F2    241-242    Monitor ZP storage
  173. CHRPTR    $00F3        243
  174. BUFEND    $00F4        244
  175. CHKSUM    $00F5        245    Temp for checksum calculation
  176. LENGTH    $00F6        246
  177. PASS    $00F7        247    Which pass we are doing str
  178. TYPE    $00F8        248    Type of block
  179. USE4DY    $00F9        249    (B.7 = 1)=> for wr, (B.6 = 1)=> for rd
  180. XSTOP    $00FA        250    Save xreg for quick stopkey test
  181. CURBNK    $00FB        251    Current bank configuration
  182. XoN    $00FC        252    Char to send for a x-on (RS232)
  183. XoFF    $00FD        253    Char to send for a x-off (RS232)
  184. SEDT2    $00FE        254    Editor temporary use
  185. LOFBUF    $00FF        255
  186.  
  187.  
  188. FBUFFR    $0100-$010F    256-271
  189. SAVEA    $0110        272    Temp Locations for
  190. SAVEY    $0111        273    ...  for Save and
  191. SAVEX    $0112        274    ...  Restore
  192. COLKEY    $0113-0122    275-289    Color/luminance table in RAM
  193. SYSSTK    $0124-01FF    291-511    System stack
  194.  
  195. BUF    $0200-0258    512-606    Basic/monitor input buffer
  196. OLDLIN    $0259-025A    601-602    Basic storage
  197. OLDTXT    $025B-025C    603-604    Basic storage
  198.  
  199.     $025D-02AC    605-684    BASIC/DOS INTERFACE AREA
  200. XCNT     $025D            DOS loop counter
  201. PNBUFR    $025E-026D        Area for filename
  202. DOSF1L    $026E            DOS filename 1 length
  203.  
  204. DOSDS1    $026F            DOS disk drive 1
  205. DOSF1A    $0270-0271        DOS filename 1 addr
  206. DOSF2L    $0272            DOS filename 2 length
  207. DOSDS2    $0273            DOS disk drive 2
  208. DOSF2A    $0274-0275        DOS filename 2 addr
  209. DOSLA    $0276            DOS logical address
  210. DOSEA    $0277            DOS phys addr
  211. DOSSA    $0278            DOS secordary address
  212. DOSDID    $0279-027A        DOS disk identifier
  213. DIDCHK    $0278            DOS DID flag
  214. DOSSTR    $027C            DOS output string buffer
  215. DOSSPC    $027D-02AC        Area used to build DOS string
  216.  
  217.  
  218. Graphics Variables
  219.  
  220. XPOS    $02AD-02AE    685-686    Current x position
  221. YPOS    $02AE-02B0    687-688    Current y position
  222. XDEST     $02B1-02B2    689-690    X coordinate destination
  223. YDEST     $02B3-02B4    691-692    Y coordinate destination
  224. XABS    $02B5-02B6    693-694
  225. YABS    $02B7-0288    69S-696
  226. XSGN    $02B9-02BA    697-69B
  227. YSGN    $02BB-028C    699-700
  228. FCT1    $02BD-02BE    701-702
  229. FCT2    $02BF-02C0    703-704
  230. ERRVAL    $02C1-02C2    705-706
  231. LESSER    $02C3        707
  232. GREATR    $02C4        708
  233. ANGSGN    $02C5        709    Sign of angle
  234. SINVAL    $02C6-02C7    710-711    Sine of value of angle
  235. COSVAL    $02C8-02C9    712-713    Cosine of value of angle
  236. ANGCNT    $02CA-02CB    714-715    Temps for angle distance routines
  237.  
  238.  
  239. Start of multiply defined area #1
  240.  
  241.     $02CC        716    Placeholder
  242. BNR    $02CD        717    Pointer to begin no.
  243. ENR    $02CE        718    Pointer to end no.
  244. DOLR    $02CF        719    Dollar flag
  245. FLAG    $02DO        720    Comma flag
  246. SWE    $02D1        721    Counter
  247. USGN    $02D2        722    Sign exponent
  248. UEXP    $02D3        723    Pointer to exponent
  249. VN    $02D4        724    # of digits before decimal point
  250. CHSN    $02D5        725    Justify flag
  251. VF    $02D6        726    # of pos before decimal point (field)
  252. NF    $02D7        727    # of pos after decimal point (field)
  253. POSP    $02D8        728    +/- flag (field)
  254. FESP    $02D9        729    Exponent flag (field)
  255. ETOF    $02DA        730    Switch
  256. CFORM    $02D8        731    Char counter (field)
  257. SNO    $02DC        732    Sign no.
  258. BLFD    $02DD        733    Blank/star flag
  259. BEGFD    $02DE        734    Pointer to beginning of field
  260. LFOR    $02DF        735    Length of format
  261. ENDFD    $02E0        736    Pointer to end of field
  262.  
  263. XCENTR    $02CC-02CD    716-717
  264. YCENTR    $02CE-02CF    718-719
  265. XDIST1    $02D0-02D1    720-721
  266. YDIST1    $02D2-02D3    722-723
  267. XDIST2    $02D4-02D5    724-725
  268. YDIST2    $02D6-02D7    726-727
  269.     $02D8-02D0    728-729    Placeholder
  270.  
  271. COLCNT    $02DA        730    Characters column counter
  272. ROWCNT    $02DB        731    Characters row counter
  273. STRCNT    $02DC        732
  274.  
  275.  
  276. Start of multiply defined area #2
  277.  
  278. XCORD1    $02CC-02CD    716-717
  279. YCORD1    $02CE-02CF    718-719
  280. BOXANG    $02D0-02D1    720-721    Rotation angle
  281. XCOUNT    $02D2-02D3    722-723
  282. YCOUNT    $02D4-02D5    724-725
  283. BXLENG    $02D6-02D7    726-727    Length of a side
  284. XCORD2    $02D8-02D9    728-729
  285. YCORD2    $02DA-02DB    730-731
  286.  
  287. XCIRCL    $02CC-02CD    716-717    Circle center, x coordinate
  288. YCIRCL  $02CE-02CF    718-719    Circle center, y coordinate
  289. XRADUS    $02D0-02D1    720-721    X radius
  290. YRADUS    $02D2-02D3    722-723    Y radius
  291. ROTANG    $02D4-02D5    724-725    Rotation angle
  292. ANGBEG    $02D8-02D9    728-729    Arc angle start
  293. ANGEND    $02DA-02DB    730-731    Arc angle end
  294. XRCOS    $02DC-02DD    732-733    X radius * cos (rotation angle)
  295. YRSIN     $02DE-02DF    734-735    Y radius * sin (rotation angle)
  296. XRSIN     $02E0-02E1    736-737    X radius * sin (rotation angle)
  297. YRCOS    $02E2-02E3    738-739    Y radius * cos (rotation angle)
  298.  
  299.  
  300. Start of multiply defined area #3
  301.  
  302.     $02CC        716    Placeholder
  303. KEYLEN    $02CD        717
  304. KEYNXT    $02CE        718
  305. STRS2    $02CE        719    String length
  306. GETTYP    $02D0        720    Replace string mode
  307. STRPTR    $02D1        721    String position counter
  308. OLDBYT    $02D2        722    Old bit map byte
  309. NEWBYT    $02D3        723    New string or bit map byte
  310.     $02D4        724    Placeholder
  311. XSI2E    $02D5-02D6    725-726    Shape column length
  312. YSIZE    $02D7-02D8    727-728    Shape row length
  313. XSAVE    $02D9-02DA    729-730    Temp for column length
  314. STRADR    $02D8-02DC    731-732    Save shape string descriptor
  315. BITIDX    $02DD        733    Bit index into byte
  316. SAYSIZ    $02DE-02E1    734-737 Temporary work locations
  317.  
  318. CHRPAG    $02E4        740    High byte addr of char ROM for char cmd
  319. LITCNT    $02E5        741    Temp for gshape
  320. SCALEM    $02E6        742    Scale mode flag
  321. WIDTH    $02E7        743    Double width flag
  322. FILFLG    $02E8        744    Box fill flag
  323. BITMSK    $02E9        745    Temp for bit mask
  324. NUMCNT    $02EA        746
  325. TRCFLG    $02EB        747    Flags trace mode
  326.  
  327. T3    $02EC        748
  328. T4    $02ED-02EE    749-750
  329. VTEMP3    $02EF        751    Graphic temp storage
  330. VTEMP4    $02F0        752
  331. VTEMP5    $02F1        753
  332.  
  333. ADRAY1    $02E2-02F3    754-755    Ptr to routine: convert float to integer
  334. ADRAY2    $02F4-02F5    756-757    Ptr to routine: convert integer to float
  335.  
  336. BNKVEC    $02FE-02FF    766-767 Vector for function cartridge users
  337. IERROR    $0300-0301    768-769 Indirect Error (Output Error in .X)
  338. IMAIN    $0302-0303    770-771 Indirect Main (System Direct Loop)
  339. ICRNCH    $0304-0305    772-773 Indirect Crunch (Tokenization Routine)
  340. IOPLOP    $0306-0307    774-775 Indirect List (Char List)
  341. IGONE    $0308-0309    776-777 Indirect Gone (Character Dispatch)
  342. IEVAL    $030A-0303    778-779 Indirect Eval (Symbol Evaluation)
  343. IESCLK    $030C-030D    780-781 Escape token crunch
  344. IESCPR    $030E-030F    782-783
  345. IESCEX    $0310-0311    784-785
  346. ITIME     $0312-0313    786-787
  347. CINV    $0314-0315    7B8-789    IRQ Ram Vector
  348. CBINV    $0316-0317    790-791 BRK Instr RAM Vector
  349. IOPEN     $0318-0319    792-793    Indirects for Code
  350. ICLOSE    $031A-031B    794-795
  351. ICHKIN    $031C-031D    796-797
  352. ICKOUT    $031E-031F    798-799
  353. ICLRCH    $0320-0321    800-801
  354. IBASIN    $0322-0323    802-803
  355. IBSOUT    $0324-Q325    804-805
  356. ISTOP     $0326-0327    806-807
  357. IGETIN    $0328-0329    808-809
  358. ICLALL    $032A-032B    810-811
  359. USRCMD    $032C-032D    812-813
  360. ILOAD     $032E-032E    814-815
  361. ISAVE     $0330-0331    816-817    Savesp
  362.  
  363. TAPBUF    $0333-03F2    819-1010    Cassette tape buffer
  364. WRLEN    $03F3-03F4    1011-1012    Length of data to be written to tape
  365. RDCNT     $03F5-03F6    1013-1014    Length of data to be read from tape
  366. INPQUE     $03F7-0436    1015-1078    RS-232 input queue
  367. ESTARL    $0437-0454    1079-1108
  368. ESTAKH    $0455-0472    1109-1138
  369.  
  370. CHRGET    $0473-0478    1139-1144
  371. CHRGOT    $04?9-0484    1145-1156
  372. QNUM    $0485-0493    1157-1171
  373.  
  374. INDSUB    $0494-04A1    1172-1185    Shared ROM fetch sub
  375. ZERO     $04A2-04A4    1186-1188    Numeric constant for Basic
  376.  
  377. INDTXT    $04A5-04AF    1189-1199    Txtptr
  378. INDIN1    $04B0-04BA    1200-1210    Index & Index1
  379. INDIN2    $04BB-04C5    1211-1221    Index2
  380. INDST1    $04C6-04D0    1222-1232    Strng1
  381. INDLOW    $04D1-04DB    1233-1243    Lowtr
  382. INDFMO    $04DC-04E6    1244-1254    Facmo
  383.  
  384. PUFILL    $04E7        1255        Print using fill symbol [space]
  385. PUCOMA    $04E8        1256        Print using comma symbol [;]
  386. PUDOT     $04E9        1257        Print using D.P. symbol  [.]
  387. PUMONY    $04EA        1258        Print using monetary symbol [$]
  388.  
  389. TMPDES    $04EB-04EE    1259-1262    Temp for instr
  390. ERRNUM    $04EF        1263        Last error number
  391. ERRLIN    $04F0-04F1    1264-1265    Line # of last error
  392. TRAPNO    $04F2-04F3    1266-1267    Line to go on error
  393. TMPTRP    $04F4        1268        Hold trap no. temporarily
  394. ERRTXT    $04F5-04E6    1269-1270
  395. OLDSTR    $04F7        1271
  396.  
  397. TMPTXT    $04F8-04F9    1272-1273
  398. TMPLIN    $04FA-04F8    1274-1275
  399.  
  400. MTIMLO    $04FC-04FD    1276-1277    Table of pending jiffies (2's comp)
  401. MTIMHI    $04FE-04FF    1278-1279
  402. USRPOK    $0500-0502    1280-1282
  403. KERNDX    $0503-0507    1283-1287
  404. DEJAVU    $0508        1288        'cold' or 'warm' start status
  405.  
  406. LAT    $0509-0512    1289-1298    Logical file numbers
  407. FAT    $0513-051C    1299-1308    Primary device numbers
  408. SAT    $051D-0526    1309-1318    Secondary addresses
  409.  
  410. KEYD    $0527-0530    1319-1328    IRQ keyboard buffer
  411. MEMSTR    $0531-0532    1329-1330    Start of memory [1000]
  412.  
  413. MSIZ    $0533-0534     1331-1332    Top of memory [FD00]
  414. TIMOUT    $0535        1333        IEEE timeout flag
  415.  
  416. FILEND    $0536        1334        File end reached = 1, 0 otherwise
  417. CTALLY    $0537        1335        # of chars left in buffer (for R & W)
  418. CBUFVA    $0538        1336        # of total valid chars in buffer (R)
  419. TPTR    $0539        1337        Ptr to next char in buffer (for R & W)
  420. FLTYPE    $053A        1338        Contains type of current cass file
  421.  
  422. COLOR    $053B        1339        Active attribute byte
  423. FLASH    $053C        1340        Character flash flag
  424.     $053D        1341        FREE
  425. HIBASE    $053E        1342        OC Base location of screen (top) [0C]
  426. XMAX     $053F        1343
  427. RPTFLG    $0540        1344        Key repeat flag
  428. KOUUT    $0541        1345
  429. DELAY    $0542        1346
  430. SHFLAG    $0543        1347        Shift flag byte
  431. LSTSHF    $0544        1348        Last shift pattern
  432. KEYLOG    $0545-0546    1349-1350    Indirect for keyboard table setup
  433. MODE     $0547        1351        shift, C=
  434. AUTODN    $0548        1352        Auto scroll down flag (0=on,0<>off)
  435. LINTMP    $0549        1353
  436. ROLFLG    $054A        1354
  437.  
  438. FORMAT    $054B        1355        Monitor non-zpage storage
  439. MSAL     $054C-054E    1356-1358
  440. WRAP     $054F        1359
  441. TMPC     $0550        1360
  442. DIFF     $0551        1361
  443. PCH    $0552        1362
  444. PCL    $0553        1363
  445. FLGS     $0554        1364
  446. ACC    $0555        1365
  447. XR    $0556        1366
  448. YR    $0557        1367
  449. SP    $0558        1368
  450. INYL     $0559        1369
  451. INVH     $055A        1370
  452. CMPFLG    $055B        1371        Used by various monitor routines
  453. BAD    $055C        1372
  454.  
  455. KYNDX    $055D        1373        Used for programmable keys
  456. KEYIDX    $055E        1374
  457. KEYBUF    $055F-0566    1375-1382    Table of P.F. lengths
  458. PKY9UF    $0567-05E6    1383-1510    P.F. Key storage area
  459.  
  460. KDATA    $05E7        1511        Temp for data write to kennedy
  461. RDYCMD    $05E8        1512        Select for kennedy read or write
  462. KDYNUM    $05E9        1513        Kennedy's dev #
  463. RDYPRS    $05EA        1514        Rennedy present = $ff, else = $00
  464. KDYTYP    $05EB        1515        Temp for type of open for kennedy
  465.  
  466.  
  467. SAVRAM    $05EC-06E8    1516-1771    1 page used by banking routines
  468. PAT    $05EC-05EF    1516-1519    Physical Address Table
  469. LNGJMP    $05F0-05F1    1520-1521    Long jump address
  470. FETARG    $05F2        1522        Long jump accumulator
  471. FETXRG    $05F3        1523        Long jump x register
  472. FETSRG    $05F4        1524        Long jump status register
  473.  
  474. AREAS    $05F5-065D    1525-1629    RAM areas for banking
  475.  
  476. ASPECH    $065E-06EB    1630-1771    RAM area for speech
  477.  
  478. STKTOP    $06EC-07AF    1772-1967    BASIC run-time stack
  479.  
  480. WROUT    $07B0        1968        Byte to be written on tape
  481. PARITY    $07B1        1969        Temp for parity calc
  482.  
  483. TT1    $07B2        1970        Temp for write-header
  484. TT2    $07B3        1971        Temp for write-header
  485. RDBITS    $07B5        1973        Local index for READBYTE routine
  486. ERRSP    $07B6        1974        Pointer into the error stack
  487. FPERRS    $07B7        1975        Number of first pass errors
  488.  
  489. DSAMP1    $07B8-07B9    1976-1977    Time constant
  490. DSAMP2    $07BA-07BB    1978-1979    Time constant
  491. ZCELL     $07BC-07BD    1980-1981    Time constant
  492.  
  493. SRECOV    $07BE        1982        Stack marker for stopkey recover
  494. DRECOV    $07BF        1983        Stack marker for dropkey recover
  495. TRSAVE    $07C0-07C3    1984-1987    params passed to RDBLOK
  496. RDETMP    $07C4        1988        Temp stat save for RDBLOK
  497. LDRSCN    $07C5        1989        # consec shorts to find in leader
  498. CDERRM    $07C6        1990        # Errors fatal in RD countdown
  499. VSAVE     $07C7        1991        Temp for Verify command
  500. T1PIPE    $07C8-a7CB    1992-1995    Pipe temp for T1
  501. ENEXT    $07CC        1996        Read error propagate
  502.  
  503.  
  504. FOR RS-232
  505.  
  506. UOUTQ    $07CD        1997        User chracter to send
  507. UOUTFG    $07CE        1998        0 = empty ; 1 = full
  508. SOUT9    $07CF        1999        System character to send
  509. SOUNFG    $07D0        2000        0 = empty ; 1 = full
  510. INOFPT    $07D1        2001        Pntr to front of input queue
  511. INQRPT    $07D2        2002        Pntr to rear of input queue
  512. INQCNT    $07D3        2003        # of chars in input queue
  513. ASTAT    $07D4        2004        Temp status for ACIA
  514. AINTMP    $07D5        2005        Temp for input routine
  515. ALSTOP    $07D6        2006        FLG for local pause
  516. ARSTOP    $07D7        2007        FLG for remote pause
  517. APRES     $07D8        2008        FLG to indicate presence of ACIA
  518.  
  519. RLUDES    $07D9-07E4    2009-2020    Indirect routine downloaded
  520. SCBOT    $07E5        2021        Screen bottom (0...24)
  521. SCTOP    $07E6        2022        Screen top
  522. SCLF    $07E7        2023        Screen left (0...39)
  523. SCRT    $07E8        2024        Screen right
  524. SCRDIS    $07E9        2025        Negative = scroll out
  525. INSFLG    $07EA        2026        Insert mode: FF = on, 00 = off
  526. LSTCHR    $07EB        2027
  527. LOGSCR    $07EC        2028
  528. TCOLOR    $07ED        2029
  529. BITABL    $07EE-07F1    2030-2033
  530.  
  531. SAREG    $07F2        2034        Registers for SYS command
  532. SXREG     $07F3        2035
  533. SYREG     $07F4        2036
  534. SPREG     $07F5        2037
  535.  
  536. LSTX    $07F6        2038        Key scan index
  537. STPDSB    $07F7        2039        Flag to disable CTRL-S pause
  538. RAMROM    $07F8        2040        MSB for monitor fetches from ROM=0;RAM=1
  539. COLSW     $07F9        2041        MSB for color/lim table in RAM=0;ROM=1
  540. FFRMSK    $07FA        2042        ROM mask for split screen
  541. VMBMSK    $07FB        2043        VM base mask for split screen
  542. LSEM    $07FC        2044        Motor lock semaphore for cassette
  543. PALCNT    $07FD        2045        PAL tod
  544.  
  545.  
  546. TEDATR    $0800-0BFF    2048-3071    TED attribute bytes
  547. TEDSCN    $0C00-0FFF    3072-4095    TED character pointers
  548. BASBGN    $1000-        4096-        Start of BASIC text area
  549. BMLUM    $1800-1BFF    6144-7167    Luminance for bit map screen
  550. BMCOLR    $1C00-1FFF    7168-8191    Color for bit map
  551.  
  552.         Commodore 16 and plus/4 Memory Configuration
  553.  
  554. $0000 System memory
  555. $0800 Color memory (Text)
  556. $0C00 Video matrix (Text)
  557. $1000 Beginning of BASIC RAM (without graphics)
  558. $1800 Luminance (Graphics)
  559. $1C00 Colour table (Graphics)
  560. $2000 Graphics screen data
  561. $4000 Beginning of BASIC RAM (with graphics)
  562. $8000 ROM BANK LOW (BASIC)
  563. $C000 BASIC expansions
  564. $D000 Character table
  565. $D800 Operating system
  566. $FC00 Routines for switching banks
  567. $FD00 End of BASIC RAM, I/O area
  568.  
  569. According to the schematics diagram, $FD00-$FF3F contains the following,
  570. regardless of the RAM/ROM banking configuration:
  571.  
  572. $FD00-FD0F: 6551 ACIA (for the RS232, only on the +4.  4 registers.)
  573. $FD10-FD1F: 6529B (1 register, drives 8 I/O-lines on the +4 user port)
  574. $FD30-FD3F: 6529B (1 register, keyboard scan. The other 8 lines come from
  575. TED)
  576.  
  577. $FF00: TED (registers shown below)
  578. $FF40: ROM
  579.  
  580. 0 Timer 1 low
  581. 1 Timer 1 high
  582. 2 Timer 2 low
  583. 3 Timer 2 high
  584. 4 Timer 3 low
  585. 5 Timer 3 high
  586. 6       Test    ECM     BMM     Blank   Rows    Y2      Y1      Y0
  587. 7       RVS off PAL     Freeze  MCM     Columns    X2      X1      X0
  588. 8 Keyboard Latch
  589. 9       IRQ     I-T3    -       I-T2    I-T1    I-LP    I-RAS   -
  590. A       -       EI-T3   -       EI-T2   EI-T1   EI-LP   EI-RAS  RC8
  591. B       RC7     RC6     RC5     RC4     RC3     RC2     RC1     RC0
  592. C       -       -       -       -       -       -       C9      CUR8
  593. D       CUR7    CUR6    CUR5    CUR4    CUR3    CUR2    CUR1    CUR0
  594. E       SND1-7  SND1-6  SND1-5  SND1-4  SND1-3  SND1-2  SND1-1  SND1-0
  595. F       SND2-7  SND2-6  SND2-5  SND2-4  SND2-3  SND2-2  SND2-1  SND2-0
  596. 10      -       -       -       -       -       -       SND2-9  SND2-8
  597. 11      SND-REL Noise   V2-SEL  V1-SEL  VOL3    VOL2    VOL1    VOL0
  598. 12      -       -       BMB2    BMB1    BMB0    R-Bank  S1-9    S1-8
  599. 13      CB5     CB4     CB3     CB2     CB1     CB0     SCLOCK  Status
  600. 14      VM4     VM3     VM2     VM1     VM0     -       -       -
  601. 15      -       LUM2    LUM1    LUM0    COLOR3  COLOR2  COLOR1  COLOR0
  602. 16      -       LUM2    LUM1    LUM0    COLOR3  COLOR2  COLOR1  COLOR0
  603. 17      -       LUM2    LUM1    LUM0    COLOR3  COLOR2  COLOR1  COLOR0
  604. 18      -       LUM2    LUM1    LUM0    COLOR3  COLOR2  COLOR1  COLOR0
  605. 19      -       LUM2    LUM1    LUM0    COLOR3  COLOR2  COLOR1  COLOR0
  606. 1A      -       -       -       -       -       -       BRE9    BRE8
  607. 1B      BRE7    BRE6    BRE5    BRE4    BRE3    BRE2    BRE1    BRE0
  608. 1C      -       -       -       -       -       -       -       VL8
  609. 1D      VL7     VL6     VL5     VL4     VL3     VL2     VL1     VL0
  610. 1E      H8      H7      H6      H5      H4      H3      H2      H1
  611. 1F      -       BL3     BL2     BL1     BL0     VSUB2   VSUB1   VSUB0
  612.  
  613. 3E Write switches on ROM bank
  614. 3F Write switches on RAM bank
  615.  
  616.     $FF0E    65294    Voice #1 frequency, bits 0-7
  617.  
  618.     $FF0F    65295    Voice #2 frequency, bits 0-7
  619.  
  620.     $FF10    65296    Voice #2 frequency, bits 8 & 9
  621.             (bit 0 is bit 8, bit 1 is bit 9)
  622.  
  623.     $FF11    65297    Bits 0-3 : Volume control
  624.             Bit 4    : Voice #1 select
  625.             Bit 5    : Voice #2 select
  626.             Bit 6    : Voice #2 noise select
  627.             Bit 7    : Sound reload
  628.  
  629.     $FF12    65298    Bit 0-1 : Voice #1 frequency, bits 8 & 9
  630.             Bit 2     : TED data fetch ROM/RAM select
  631.             Bits 0-5 : Bit map base address
  632.  
  633.     $FF13    65299    Bit 0 :    Clock status
  634.             Bit 1 :    Set single clock
  635.             Bits 2-7 : Character data base address
  636.  
  637.     $FF14    65309    Bits 3-7 : Video matrix/color memory base address
  638.  
  639.     $FF15    65301    Background color register
  640.             Bits 0-3 : Color
  641.             Bits 4-6 : Luminance
  642.  
  643.     $FF16    65302    Color register #1
  644.             Bits 0-3 : Color
  645.             Bits 4-6 : Luminance
  646.  
  647.     $FF17    65303    Color register #2
  648.             Bits 0-3 : Color
  649.             Bits 4-6 : Luminance
  650.  
  651.     $FF18    65304    Color registes #3
  652.             Bits 0-3 : Color
  653.             Bits 4-6 : Luminance
  654.  
  655.     $FF19    65305    Color register #4
  656.             Bits 0-3 : Color
  657.             Bits 4-6 : Luminance
  658.  
  659.     $FF1A    65306    Bit map reload
  660.  
  661.     $FF1B    65307    Bit map reload
  662.  
  663.     $FF1C    65308    Bit 0 : Vertical line bit 8
  664.  
  665.     $FF1D    65309    Bits 0-7 : Vertical line bits 0-7
  666.  
  667.     $FF1E    65310    Horizontal position
  668.  
  669.     $FF1F    65311    Blink, vertical sub address
  670.  
  671.     $FF3E    65342    ROM select
  672.  
  673.     $FF3F    65343    RAM select
  674.  
  675.  
  676.  
  677.   BANKING JUMP TABLE
  678.  
  679.     $FCF1    64753    JMP to cartridge IRQ routine
  680.     $FCF4    64756    JMP to PHOENIX routine
  681.     $FCF7    64759    JMP to LONG FETCH routine
  682.     $FCFA    64762    JMP to LONG JUMP routine
  683.     $FCFD    64765    JMP to LONG IRQ routine
  684.  
  685.  
  686.   UNOFFICIAL JUMP TABLE
  687.     $FF49      65353    JMP to define function key routine
  688.     $FF4C      65356    JMP to PRINT routine
  689.     $FF4F      65359    JMP to PRIMM routine
  690.     $FF52      65362    JMP to ENTRY routine
  691.     $FF80      65408    RELEASE # OF KERNAL (MSB: 0 = NTSC ; 1 = PAL)
  692.  
  693.  
  694.   KERNAL JUMP TABLE
  695.  
  696. ; NAME     ADDRESS    DESCRIPTION
  697. ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  698. CINT    $FF81    65409    Initialize screen editor
  699. IOINIT    $FF84    65412    Initialize I/O devices
  700. RAMTAS    $FF87    65415    Ram test
  701. RESTOR    $FF8A    65418    Restore vectors to initial values
  702. VECTOR    $FF8D    65421    Change vectors for user
  703. SETMSG    $FF90    65424    Control O.S. messages
  704. SECND    $FF93    65427    Send SA after LISTEN
  705. TKSA    $FF96    65430    Send SA after TALK
  706. MEMTOP    $FF99    65433    Set/Read top of memory
  707. MEMBOT    $FF9C    65436    Set/Read bottom of memory
  708. SCNKEY    $FF9F    65439    Scan keyboard
  709. SETTMO    $FFA2    65442    Set timeout in DMA disk
  710. ACPTR    $FFA5    65445    Handshake serial bus or DMA disk byte in
  711. CIoUT    $FFA8    65448    Handshake serial bus or DMA disk byte out
  712. UNTLR    $FFAB    65451    Send UNTALK out serial bus or DMA disk
  713. UNLSN    $FFAE    65454    Send UNLISTEN out serial bus or DMA disk
  714. LISTN    $FFB1    65457    Send LISTEN out serial bus or DMA disk
  715. TALK    $FFB4    65460    Send TALK out serial bus or DMA disk
  716. READSS    $FFB7    65463    Return I/O STATUS byte
  717. SETLFS    SEF8A    65466    Set LA, FA, SA
  718. SETNAM    $FFBD    65469    Set length and FN address
  719. OPEN     $FFC0    65472    Open logical file
  720. CLOSE    $FFC3    65475    Close logical file
  721. CHKIN    $FFC6    65478    Open channel in
  722. CHOUT    $FEC9    65481    open channel out
  723. CLRCH    $FECC    65484    Close I/O channels
  724. 8ASIN    $FFCF    65487    Input from channel
  725. BSOUT    $FFD2    65490    output to channel
  726. LOADSP    $FFD5    65493    Load from file
  727. SAYESP    $FFD8    65496    Save to file
  728. SETTIM    $FFDB    65499    Set internal clock
  729. RDTIM    $FFDE    65502    Read internal clock
  730. STOP    $FFE1    6S50S    Scan STOP key
  731. GETIN    $FFE4    65508    Get character from queue
  732. CLALL    $FFE7    65511    Close all files
  733. UDTIM    $FFEA    65514    Increment clock
  734. SCRORG    $FFED    65517    Screen org.
  735. PLOT     $FFF0    65520    Read/Set X,Y coord of cursor
  736. IOBASE    $FFF3    65523    Return location of start of I/O
  737.  
  738.